﻿/*------------------------------------------------
// File Description: AllocateProduct DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-03-09 16:30:15
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 调拨产品表
    /// </summary>
    [Table(nameof(AllocateProduct))]
    public class AllocateProduct : BaseEntity
    {
        private string _productCode = string.Empty;
        private string _productName = string.Empty;
        private string _specifications = string.Empty;
        private string _batchNo = string.Empty;
        private string _effectiveness = string.Empty;
        private string _color = string.Empty;
        private string _unit = string.Empty;
        private string _pO = string.Empty;
        private string _productionOriginCertification = string.Empty;
        private string _productionCompany = string.Empty;
        private string _allocateNo = string.Empty;
        private string _categoryCode = string.Empty;
        private string _categoryName = string.Empty;
        private string _batchNoBig = string.Empty;
        private string _batchNoSmall = string.Empty;
        private string _workOrderNo = string.Empty;
        private string _orderNo = string.Empty;

        #region Public Property

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// 工单号
        ///</Summary>
        public string WorkOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
            set { _workOrderNo = value; }
        }

        ///<Summary>
        /// 调拨单ID
        ///</Summary>
        public string AllocateNo
        {
            get { return string.IsNullOrWhiteSpace(_allocateNo) ? string.Empty : _allocateNo; }
            set { _allocateNo = value; }
        }

        ///<Summary>
        /// 分类编号
        ///</Summary>
        public string CategoryCode
        {
            get { return string.IsNullOrWhiteSpace(_categoryCode) ? string.Empty : _categoryCode; }
            set { _categoryCode = value; }
        }

        ///<Summary>
        /// 分类名称
        ///</Summary>
        public string CategoryName
        {
            get { return string.IsNullOrWhiteSpace(_categoryName) ? string.Empty : _categoryName; }
            set { _categoryName = value; }
        }

        ///<Summary>
        /// 存货编号
        ///</Summary>
        public string ProductCode
        {
            get { return string.IsNullOrWhiteSpace(_productCode) ? string.Empty : _productCode; }
            set { _productCode = value; }
        }

        ///<Summary>
        /// 存货名称
        ///</Summary>
        public string ProductName
        {
            get { return string.IsNullOrWhiteSpace(_productName) ? string.Empty : _productName; }
            set { _productName = value; }
        }

        ///<Summary>
        /// 规格型号
        ///</Summary>
        public string Specifications
        {
            get { return string.IsNullOrWhiteSpace(_specifications) ? string.Empty : _specifications; }
            set { _specifications = value; }
        }

        ///<Summary>
        /// 数量
        ///</Summary>
        public decimal Quantity { get; set; }

        ///<Summary>
        /// 收货数量
        ///</Summary>
        public decimal ReceiveQuantity { get; set; }

        ///<Summary>
        /// 批次号
        ///</Summary>
        public string BatchNo
        {
            get { return string.IsNullOrWhiteSpace(_batchNo) ? string.Empty : _batchNo; }
            set { _batchNo = value; }
        }

        ///<Summary>
        /// 效率
        ///</Summary>
        public string Effectiveness
        {
            get { return string.IsNullOrWhiteSpace(_effectiveness) ? string.Empty : _effectiveness; }
            set { _effectiveness = value; }
        }

        ///<Summary>
        /// 功率
        ///</Summary>
        public string Power { get; set; }

        ///<Summary>
        /// 厚度
        ///</Summary>
        public string Thickness { get; set; }

        ///<Summary>
        /// 颜色
        ///</Summary>
        public string Color
        {
            get { return string.IsNullOrWhiteSpace(_color) ? string.Empty : _color; }
            set { _color = value; }
        }

        ///<Summary>
        /// 单位
        ///</Summary>
        public string Unit
        {
            get { return string.IsNullOrWhiteSpace(_unit) ? string.Empty : _unit; }
            set { _unit = value; }
        }

        ///<Summary>
        /// PO
        ///</Summary>
        public string PO
        {
            get { return string.IsNullOrWhiteSpace(_pO) ? string.Empty : _pO; }
            set { _pO = value; }
        }

        ///<Summary>
        /// 产地证
        ///</Summary>
        public string ProductionOriginCertification
        {
            get { return string.IsNullOrWhiteSpace(_productionOriginCertification) ? string.Empty : _productionOriginCertification; }
            set { _productionOriginCertification = value; }
        }

        ///<Summary>
        /// 生产厂家
        ///</Summary>
        public string ProductionCompany
        {
            get { return string.IsNullOrWhiteSpace(_productionCompany) ? string.Empty : _productionCompany; }
            set { _productionCompany = value; }
        }

        ///<Summary>
        /// 托盘号
        ///</Summary>
        public string BatchNoBig
        {
            get { return string.IsNullOrWhiteSpace(_batchNoBig) ? string.Empty : _batchNoBig; }
            set { _batchNoBig = value; }
        }

        ///<Summary>
        /// 箱号
        ///</Summary>
        public string BatchNoSmall
        {
            get { return string.IsNullOrWhiteSpace(_batchNoSmall) ? string.Empty : _batchNoSmall; }
            set { _batchNoSmall = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 调拨产品表
        /// </summary>
        public virtual DbSet<AllocateProduct> AllocateProducts { get; set; }
    }
}
